<template>
  <div class="container">
    <div>
      <kjSwiper :height="'650px'"></kjSwiper>
      <!-- <kjLogo /> -->
      <!-- <el-alert :title="quote" type="success">
        </el-alert>
        
        <header class="header-container mb-20">

        </header>
        <ul>
            <li v-for="item in post1" :key="item.id">{{item.title}}</li>
        </ul>
         -->
    </div>
  </div>
</template>

<script>
export default {
  fetch({ store, params, app }) {
    app.$cookies.set("cookie-name", "cookie-value", {
      path: "/",
      maxAge: 60 * 60 * 24 * 7
    });
  },
  computed: {
    isMobile() {
      return this.$store.state.app.isMobile;
    },
    userInfo() {
      return this.$store.state.user.userInfo;
    },
    isFirstLogin() {
      return this.$store.state.app.isFirstLogin;
    }
  },
  data() {
    return {
      num: 200000,
      quote: "",
      post1: {}
    };
  },
  mounted() {
    console.log(this.$cookies.get("cookie-name"));
    // localhost:3000/api/api2
    this.$axios.get("api2").then(data => {
      this.quote = data.quote;
    });
    this.testJsonServer();
  },
  methods: {
    testJsonServer() {
      this.$axios.get("posts").then(data => {
        this.post1 = data;
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.container {
  margin: 0 auto;
  min-height: 100vh;

  width: 100%;
}

.header-container {
  height: $header_height;
}

.title {
  font-family: "Quicksand", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: block;
  font-weight: 300;
  font-size: 100px;
  color: #35495e;
  letter-spacing: 1px;
}

.subtitle {
  font-weight: 300;
  font-size: 42px;
  color: #526488;
  word-spacing: 5px;
  padding-bottom: 15px;
}

.links {
  padding-top: 15px;
}
</style>
